package com.example.cr.insect.request;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

public class PreventionPlanRequest {
    /**
     * id
     */
    private Long id;

    /**
     * 方案名称
     */
    @NotBlank(message = "【方案名称】不能为空")
    @Size(max = 50)
    private String name;

    /**
     * 目标害虫ID
     */
    @NotNull(message = "【目标害虫ID】不能为空")
    private Long pestId;

    /**
     * 防治方法
     */
    @NotBlank(message = "【防治方法】不能为空")
    @Size(max = 20)
    private String method;

    /**
     * 化学药剂名称
     */
    @Size(max = 100)
    private String chemicalName;

    /**
     * 使用剂量
     */
    @Size(max = 50)
    private String dosage;

    /**
     * 使用频率
     */
    @Size(max = 50)
    private String frequency;

    /**
     * 效果评级
     */
    @NotBlank(message = "【效果评级】不能为空")
    @Size(max = 10)
    private String effectiveness;

    /**
     * 方案描述
     */
    @Size(max = 255)
    private String description;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createdAt;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updatedAt;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getPestId() {
        return pestId;
    }

    public void setPestId(Long pestId) {
        this.pestId = pestId;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getChemicalName() {
        return chemicalName;
    }

    public void setChemicalName(String chemicalName) {
        this.chemicalName = chemicalName;
    }

    public String getDosage() {
        return dosage;
    }

    public void setDosage(String dosage) {
        this.dosage = dosage;
    }

    public String getFrequency() {
        return frequency;
    }

    public void setFrequency(String frequency) {
        this.frequency = frequency;
    }

    public String getEffectiveness() {
        return effectiveness;
    }

    public void setEffectiveness(String effectiveness) {
        this.effectiveness = effectiveness;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", pestId=").append(pestId);
        sb.append(", method=").append(method);
        sb.append(", chemicalName=").append(chemicalName);
        sb.append(", dosage=").append(dosage);
        sb.append(", frequency=").append(frequency);
        sb.append(", effectiveness=").append(effectiveness);
        sb.append(", description=").append(description);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append("]");
        return sb.toString();
    }
}